import request from '@/utils/request'

// 查询实验场景信息列表,,,携带用户ID
export function listScenarios(query,userids) {
  return request({
    url: '/Teacher/scenarios/list/'+userids,
    method: 'get',
    params: query
  })
}

// 查询实验场景信息详细
export function getScenarios(scenarioId) {
  return request({
    url: '/Teacher/scenarios/' + scenarioId,
    method: 'get'
  })
}

// 新增实验场景信息
export function addScenarios(data) {
  return request({
    url: '/Teacher/scenarios',
    method: 'post',
    data: data
  })
}

// 修改实验场景信息
export function updateScenarios(data) {
  return request({
    url: '/Teacher/scenarios',
    method: 'put',
    data: data
  })
}

// 删除实验场景信息
export function delScenarios(scenarioId) {
  return request({
    url: '/Teacher/scenarios/' + scenarioId,
    method: 'delete'
  })
}

export function listValidPurchasedScenarios(schoolId) {
  return request({
    url: `/Teacher/scenarios/purchased/${schoolId}`,
    method: 'get'
  })
}
